package com.googlecode.classgrep.grep.annotated;

import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.googlecode.classgrep.grep.annotated.internal.AnnotationGrepInternal;
import com.googlecode.classgrep.info.AnnotationInfo;

public class AnnotationGrep implements AnnotationGrepInternal {

	private final Map<String, List<AnnotationInfo>> annotated = new HashMap<String, List<AnnotationInfo>>();

	public Map<String, List<AnnotationInfo>> getAnnotatedAnnotationMap() {
		return annotated;
	}

	public List<AnnotationInfo> findAnnotatedAnnotations(Class<? extends Annotation> annotation) {
		return annotated.get(annotation.getName());
	}
	
}
